<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>isLeapYear</title>
</head>

<body>
    <script>
        const isLeapYear = year => new Date(year, 1, 29).getMonth() === 1;
        document.write(`今年${isLeapYear(new Date().getFullYear()) ? '' : '不'}是闰年`)
    </script>
</body>

</html>